package evaluation;

import mulan.classifier.InvalidDataException;
import mulan.classifier.MultiLabelLearner;
import mulan.data.InvalidDataFormatException;
import mulan.data.MultiLabelInstances;

public class BuildAndEvaluateMulanEvaluator extends MulanEvaluator {
	
	String train_file;

	public BuildAndEvaluateMulanEvaluator(String train_file,String test_file, String xml_file,
			MultiLabelLearner learner) {
		super(test_file, xml_file, learner);
		this.train_file = train_file;
		try {
			train = new MultiLabelInstances(train_file, xml_file);
		} catch (InvalidDataFormatException e) {
			e.printStackTrace();
		}
	}

	@Override
	void buildModel() {
		try {
			learner.build(train);
		} catch (InvalidDataException e) {
			e.printStackTrace();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	

}
